<template>
  <div>
    <el-row>
      <el-col :span="24">
        <div style="height: 20px;"></div>
        <el-table :data="venues" border>
          <el-table-column prop="venueName" label="场馆名" width="200"></el-table-column>
          <el-table-column prop="venueImage" label="场馆照片" width="200">
            <template slot-scope="scope">
              <img :src="scope.row.venueImage" alt="" style="width: 100px; height: 100px;">
            </template>
          </el-table-column>
          <el-table-column prop="venueDetails" label="场馆细节" width="300"></el-table-column>
          <el-table-column prop="businessState" label="经营状态" width="100">
            <template slot-scope="scope">
              <span v-if="scope.row.businessState === 0">歇业</span>
              <span v-else>正常营业</span>
            </template>
          </el-table-column>
          <el-table-column prop="venueAddress" label="地址" width="200"></el-table-column>
          <el-table-column prop="businessStartTime" label="营业开始时间" width="150"></el-table-column>
          <el-table-column prop="businessEndTime" label="营业结束时间" width="150"></el-table-column>
          <el-table-column prop="area" label="面积" width="100"></el-table-column>
          <el-table-column prop="createTime" label="建立时间" width="200"></el-table-column>
          <el-table-column prop="classroomNum" label="教室数量" width="100"></el-table-column>
        </el-table>
      </el-col>
    </el-row>
  </div>
</template>

<script>

export default {
  name:'CoachEnterVenue',
  data() {
    return {
      venues: []
    };
  },
  methods: {
    fetchVenues() {
      this.$http.get('venue/yVenueCoach/queryCoachIdEnterVenue', {
        headers: {
          token: 'your_token_here'
        }
      })
      .then(response => {
        this.venues = response.data.data;
      })
      .catch(error => {
        console.error('Error fetching venues:', error);
      });
    }
  },
  created() {
    this.fetchVenues();
  }
};
</script>

<style>
.el-table .el-table__cell {
  white-space: normal;
}
</style>
